(function() { tinymce.create('tinymce.plugins.FileMgrPlugin', { init: function(ed, url) { ed.addCommand('mceFileMgr', function() { var path = '/Admin/Media?allowMceInsert=true'; if (window["mceTaskFolderId"] != null && !isNaN(mceTaskFolderId)) { path = path + '&folderId=' + mceTaskFolderId.toString() } ed.windowManager.open({ file: path, width: 640 + parseInt(ed.getLang('FileMgr.delta_width', 0)), height: 400 + parseInt(ed.getLang('FileMgr.delta_height', 0)), inline: 1 }, { plugin_url: url }) }); ed.addButton('FileMgr', { title: 'FileMgr.FileMgr_desc', cmd: 'mceFileMgr', image: url + '/img/filemgr.gif' }) }, getInfo: function() { return { longname: 'File Manager', author: 'Mindfor, Ltd.', authorurl: 'http://mindfor.ru', infourl: 'http://mindfor.ru', version: tinymce.majorVersion + "." + tinymce.minorVersion} } }); tinymce.PluginManager.add('FileMgr', tinymce.plugins.FileMgrPlugin) })();